package com.dv.driverless.service.impl;

import java.util.List;

import com.dv.driverless.domain.EquipmentRadar;
import com.dv.driverless.mapper.EquipmentRadarMapper;
import com.dv.driverless.service.IEquipmentRadarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 雷达信息Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-02
 */
@Service
public class EquipmentRadarServiceImpl implements IEquipmentRadarService
{
    @Autowired
    private EquipmentRadarMapper equipmentRadarMapper;

    /**
     * 查询雷达信息
     *
     * @param id 雷达信息主键
     * @return 雷达信息
     */
    @Override
    public EquipmentRadar selectEquipmentRadarById(Long id)
    {
        return equipmentRadarMapper.selectEquipmentRadarById(id);
    }

    /**
     * 查询雷达信息列表
     *
     * @param equipmentRadar 雷达信息
     * @return 雷达信息
     */
    @Override
    public List<EquipmentRadar> selectEquipmentRadarList(EquipmentRadar equipmentRadar)
    {
        return equipmentRadarMapper.selectEquipmentRadarList(equipmentRadar);
    }

    /**
     * 新增雷达信息
     *
     * @param equipmentRadar 雷达信息
     * @return 结果
     */
    @Override
    public int insertEquipmentRadar(EquipmentRadar equipmentRadar)
    {
        return equipmentRadarMapper.insertEquipmentRadar(equipmentRadar);
    }

    /**
     * 修改雷达信息
     *
     * @param equipmentRadar 雷达信息
     * @return 结果
     */
    @Override
    public int updateEquipmentRadar(EquipmentRadar equipmentRadar)
    {
        return equipmentRadarMapper.updateEquipmentRadar(equipmentRadar);
    }

    /**
     * 批量删除雷达信息
     *
     * @param ids 需要删除的雷达信息主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentRadarByIds(Long[] ids)
    {
        return equipmentRadarMapper.deleteEquipmentRadarByIds(ids);
    }

    /**
     * 删除雷达信息信息
     *
     * @param id 雷达信息主键
     * @return 结果
     */
    @Override
    public int deleteEquipmentRadarById(Long id)
    {
        return equipmentRadarMapper.deleteEquipmentRadarById(id);
    }


    /**
     * 修改雷达状态
     * @param equipmentRadar
     * @return
     */
    @Override
    public int updateUserStatus(EquipmentRadar equipmentRadar) {
        return equipmentRadarMapper.updateEquipmentRadarStatus(equipmentRadar);
    }
}
